feat(openapi-v3): add OAS3 visibility decorator#6414
Conversation
887f18f to
33e21e5
Compare
| tags: string[]; | ||
| } | ||
|
|
||
| export type VisibilityDecoratorMetadata = 'documented' | 'undocumented'; |
There was a problem hiding this comment.
enum or union type, which one is better?
There was a problem hiding this comment.
Personally, I am fine with the union type.
There was a problem hiding this comment.
enum may be useful for pure-JavaScript experiences, but I'm ok with either.
There was a problem hiding this comment.
Changed to enum to be in line with existing packages (e.g. repository, authorization, context`)
Will need to fix the errors. Errors fixed.
bajtos
left a comment
There was a problem hiding this comment.
This is awesome @achrinza! I like that you included detailed documentation, extensive test coverage and the code is closely following our coding style 👏🏻
I have few comments to consider, PTAL 👇🏻
BTW are there any places where we could replace explicit x-visibility: undocumented with @oas.visibility() decorator instead? It would be great to update https://loopback.io/doc/en/lb4/creating-components-rest-api.html#undocumented-endpoints to show the new approach.
| tags: string[]; | ||
| } | ||
|
|
||
| export type VisibilityDecoratorMetadata = 'documented' | 'undocumented'; |
There was a problem hiding this comment.
Personally, I am fine with the union type.
|
I've modified the behaviour to explicitly keep the value of If need be, this should be stripped away by RoutingTable instead. |
bajtos
left a comment
There was a problem hiding this comment.
Looks pretty good 👏🏻
I have two minor comments to consider 👇🏻
closes loopbackio#6392 Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com> Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
abd55fb to
aa0a15f
Compare
closes #6392
Signed-off-by: Rifa Achrinza 25147899+achrinza@users.noreply.github.com
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated👉 Check out how to submit a PR 👈